GtkFontChooser: Unref deprecated widgets on finalize
authorAlberto Ruiz <aruiz@gnome.org>
Thu, 28 Apr 2011 01:46:09 +0000 (02:46 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 15 Aug 2011 22:57:53 +0000 (18:57 -0400)
gtk/gtkfontchooser.c

index ea6aa89057d2b8d1e9fe5169ae975aa8f26eb62e..74afa1b1d652f6e4942558eaa31fd10d73004390 100644 (file)
@@ -908,6 +908,14 @@ gtk_font_selection_finalize (GObject *object)
   gtk_font_selection_ref_family (fontsel, NULL);
   gtk_font_selection_ref_face (fontsel, NULL);
 
+  /* FIXME: Remove this for 4.0 */
+  if (fontsel->priv->size_list)
+    {
+      g_object_unref (fontsel->priv->size_list);
+      g_object_unref (fontsel->priv->font_list);
+      g_object_unref (fontsel->priv->face_list);
+    }
+
   G_OBJECT_CLASS (gtk_font_selection_parent_class)->finalize (object);
 }
 
@@ -1071,16 +1079,6 @@ initialize_deprecated_widgets (GtkFontSelection *fontsel)
   cursor_changed_cb (priv->family_face_list, priv);
 }
 
-static void
-destroy_deprecated_widgets (GtkFontSelection *fontsel)
-{
-  GtkFontSelectionPrivate *priv = fontsel->priv;
-
-  g_object_unref (priv->size_list);
-  g_object_unref (priv->font_list);
-  g_object_unref (priv->face_list);
-}
-
 /*****************************************************************************
  * These functions are the main public interface for getting/setting the font.
  *****************************************************************************/